import Axios from "../utils/axios"
import api from "../api"
//私教管理
function getPrivateEducationInformation(coachId:number,courseName:string,limit:number,page:number){//私教信息所有
  return Axios.post(api.apihicky.getMessage,{coachId,courseName,limit,page})
}
//私教删除
function getPersonalDel(id:number){
  return Axios.delete(api.apihicky.getPersonalDel+id)
}
//私教课程回显
function getDisplayed(id:number){
  return Axios.get(api.apihicky.getDisplayed+id)
}

//添加私教课程
function getAddPersonalTrainer(obj:object){
  return Axios.post(api.apihicky.getAddPersonalTrainer,obj)
}
//编辑私教课程
function getCompilePersonalTrainer(id,obj:object){
  obj.id=Number(id)
  return Axios.put(api.apihicky.getCompilePersonalTrainer,obj)
}

//根据课程教练和课程名称查询
function getInquire(name:string,limit:number,page:number,id:string){
  return Axios.post(api.apihicky.getInquire,{name,limit,page,id})
}



export default{
    getPrivateEducationInformation,
    getPersonalDel,
    getAddPersonalTrainer,
    getCompilePersonalTrainer,
    getDisplayed,
    getInquire
}